<include file="Public:header" />

<div class="tools"> 
	<div class="add"><span><a href="{:U('Content/editarticle')}">添加</a></span></div>
	<div class="del"><span><a href="javascript:void(0);" onclick="del(0,'article','article');">删除</a></span></div>
	<div class="add"><span><a href="javascript:void(0);" onclick="hui(0,'article','article');">恢复</a></span></div>
	<div class="del"><span><a href="javascript:void(0);" onclick="noshen(0,'article','article');">审核不通过</a></span></div>
	<div class="add"><span><a href="javascript:void(0);" onclick="shen(0,'article','article');">审核通过</a></span></div>
	<div class="del"><span><a href="javascript:void(0);" onclick="xia(0,'article','article');">下架</a></span></div>
	<div class="add"><span><a href="javascript:void(0);" onclick="shang(0,'article','article');">上架</a></span></div>
</div>
<div class="tools"> 
	<div ><span><a href="{:U('Content/article',array(mid=>$menu_id,bjid=>$bianji_id))}" class="buttom <egt name='state_id' value='0'> <else/> fenbg </egt>">所有</a></span></div>
	<div ><span><a href="{:U('Content/article',array(st=>1,mid=>$menu_id,bjid=>$bianji_id))}" class="buttom <eq name='state_id' value='1'> fenbg </eq>">正常状态</a></span></div>
	<div ><span><a href="{:U('Content/article',array(st=>0,mid=>$menu_id,bjid=>$bianji_id))}" class="buttom <eq name='state_id' value='0'> fenbg </eq>">未审核</a></span></div>
	<div ><span><a href="{:U('Content/article',array(st=>3,mid=>$menu_id,bjid=>$bianji_id))}" class="buttom <eq name='state_id' value='3'> fenbg </eq>">已删除</a></span></div>
	<div ><span><a href="{:U('Content/article',array(st=>2,mid=>$menu_id,bjid=>$bianji_id))}" class="buttom <eq name='state_id' value='2'> fenbg </eq>">已下架</a></span></div>
</div>
<div class="tools" style="height:auto;"> 
	<div ><span><a href="{:U('Content/article',array(st=>$state_id,bjid=>$bianji_id))}" class="buttom <egt name='menu_id' value='0'> <else/> fenbg </egt>" >所有类别</a></span></div>
	<volist name="menus" id="menus">
		<div ><span><a href="{:U('Content/article',array(st=>$state_id,mid=>$menus[id],bjid=>$bianji_id))}" class="buttom <eq name='menus.id' value='$menu_id'> fenbg </eq>" >{$menus.name}</a></span></div>
	</volist>
	<div ><span><a href="{:U('Content/article',array(st=>$state_id,bjid=>$bianji_id,mid=>0))}" class="buttom <eq name='menu_id' value='0'> fenbg </eq>" >无类别</a></span></div>
</div>
<div class="tools" style="height:auto;"> 
	<div ><span><a href="{:U('Content/article',array(st=>$state_id,mid=>$menu_id))}" class="buttom <elt name='bianji_id' value='0'> fenbg </elt>">所有用户组</a></span></div>
	<volist name="bianjis" id="bianjis">
		<div ><span><a href="{:U('Content/article',array(st=>$state_id,mid=>$menu_id,bjid=>$bianjis[id]))}" class="buttom <eq name='bianjis.id' value='$bianji_id'> fenbg </eq>">{$bianjis.name}</a></span></div>
	</volist>
</div>
<div class="content">
<div class="page">{$page}</div>
<!-----------------------------------------内容开始--------------------------------------------------->
<form action="{:U('Content/search_article')}" method="post">
	<style type="text/css">
	.buttom{margin-bottom:3px;}
	.fenbg{color:#da9695 !important;}
	.ss_art_span{float:left;height:26px;line-height:30px;font-size:14px;padding-right:5px;}
	.ss_art_input{float:left;width:300px;height:26px;color:#aaa;}
	.ss_art_btn{width:30px;height:30px;line-height:30px;float:left;cursor:pointer;border:1px solid #ddd;}
	</style>
	<span class="ss_art_span">搜索文章：</span>
	<input type="text" name="ss_key" class="ss_art_input" value="请输入文章标题或ID号..." />
	<input type="image" src="./Public/Share/img/ss_btn.png" value=" " class="ss_art_btn"/>
	<script type="text/javascript">
	//搜索框 切换 初始提示文字
	$(function(){
		$("input.ss_art_input").focus(function(){
			if($(this).val()=="请输入文章标题或ID号..."){
				$(this).val('');
			}
		});
		$("input.ss_art_input").blur(function(){
			if($(this).val()=="请输入文章标题或ID号..." || $(this).val()=="" ){
				$(this).val('请输入文章标题或ID号...');
			}
		});
	});
	</script>
</form>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabBox">
<tr class="tabTitleMain">
    <td width="5%" class="selectAll"><a href="javascript:;" id="selall">全选</a></td>
    <td width="5%">ID号</td>
    <td width="9%">标题</td>
    <td width="9%">创建时间</td>
    <td width="9%">修改时间</td>
    <td width="9%">录入用户名</td>
    <td width="7%">被阅读次数</td>
    <td width="10%">操作</td>
</tr>


<volist name='list' id='l'>
<tr class="tabTextMain" id="From_1" onmouseout="this.style.background='#FFFFFF';" onmouseover="this.style.background='#fbf435';">
	<td><input type="checkbox" name="ids" id="ids" value="{$l.id}"></td>
	<td>{$l.id}</td>
	<td>{$l.name}</td>
	<td>{$l.ctime|date='Y-m-d H:i:s',###}</td>
	<td>{$l.stime|date='Y-m-d H:i:s',###}</td>
	<td>{$l.username}</td>
	<td>{$l.readss}</td>
	<td>
		<a href="./index.php?a=article&m=index&arid={$l.id}" target="_blank">预览</a>
		|
		<a href="{:U('Content/editarticle',array(id=>$l[id]))}" target="_blank">修改</a>
		|
		<php>
		if($l['state']==0){
		</php>
			<a href="javascript:;" onclick="shen({$l.id},'article','article');">审核通过</a>
		<php>
		}else if($l['state']==1){
		</php>
			<a href="javascript:;" onclick="del({$l.id},'article','article');">删除</a>
			|
			<a href="javascript:;" onclick="xia({$l.id},'article','article');">下架</a>
			|
			<a href="javascript:;" onclick="noshen({$l.id},'article','article');">审核不通过</a>
		<php>
		}else if($l['state']==2){
		</php>
			<a href="javascript:;" onclick="shang({$l.id},'article','article');">上架</a>
		<php>
		}else if($l['state']==3){
		</php>
			<a href="javascript:;" onclick="hui({$l.id},'article','article');">恢复</a>
		<php>
		}
		</php>
	</td>
</tr>
</volist>
  
</table> 
<div class="page">{$page}</div>
<!-----------------------------------------内容结束--------------------------------------------------->
</div>

<script type="text/javascript" src="__JS__/admin_common.js"></script>

<include file="Public:footer" />
